package com.example.message.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.message.entity.PersonInfo;
import com.example.message.entity.Task1;
import com.example.message.mapper.Task1Mapper;
import com.example.message.service.Task1Service;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 公告实现类
 * </p>
 *
 * @author lengleng
 * @since 2019/2/1
 */
@Service
@RequiredArgsConstructor
public class Task1ServiceImpl extends ServiceImpl<Task1Mapper, Task1> implements Task1Service {

	@Override
	public IPage getTaskById(Page page, int taskId){

		return baseMapper.getTaskById(page, taskId);
	}

	@Override
	public List<PersonInfo> getDeptUser(String deptId) {
//		System.out.println("deptId:"+deptId);
		if(deptId.equals("1") || deptId.equals("") || deptId.equals(null)){
			return baseMapper.getDeptUser("");
		}
		return baseMapper.getDeptUser(deptId);
		}



}
